﻿using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using SXICE.Core.Models;
using SXICE.IService;
using SXICE.IService.Models;
using SXICE.WebAPI.Utilities;
using SXICE.Core.Helpers;
using SXICE.Core.Domains;
using SXICE.WebAPI.Models.DTOs;
using AutoMapper;
using System.Collections.Generic;
using System.Text;
using SXICE.Core.Infrastructure;

namespace SXICE.WebAPI.Controllers
{
    /// <summary>
    /// 宫颈癌控制器
    /// </summary>
    [Route("")]
    [Authorize]
    public class CCController : ControllerBase
    {
        private readonly ICCService cCService;

        public CCController(ICCService cCService)
        {
            this.cCService = cCService;
        }

        /// <summary>
        /// 下一步
        /// </summary>
        /// <param name="id">选项ID</param>
        /// <param name="start">是否为开始</param>
        /// <returns>结果</returns>
        [HttpGet]
        public ReturnResult<CCProgressModel> Next(int id, bool start)
        {
            return cCService.Next(WorkContext.ToCustomer, start, id);
        }

        /// <summary>
        /// 回退
        /// </summary>
        /// <returns>结果</returns>
        [HttpGet]
        public ReturnResult<CCProgressModel> Back()
        {
            return cCService.Back(WorkContext.ToCustomer);
        }
    }
}